package com.yipinhouse.employee.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yipinhouse.employee.infra.model.BrokerInfo;
import com.yipinhouse.employee.service.dto.BrokerInfoDto;
import com.yipinhouse.employee.service.dto.PromotionDto;
import com.yipinhouse.employee.service.dto.ShopBrokerInfoDto;
import com.yipinhouse.employee.service.param.AddBrokerServiceParam;
import com.yipinhouse.employee.service.param.LoginServiceParam;

import java.util.List;

/**
 * <p>
 * 经纪人信息表 服务类
 * </p>
 *
 * @author Lucas
 * @since 2022-11-30
 */
public interface BrokerInfoService extends IService<BrokerInfo> {

    /**
     * 添加员工
     * @param addBrokerServiceParam
     * @return
     */
    BrokerInfoDto addBroker(AddBrokerServiceParam addBrokerServiceParam);

    /**
     * 员工登录信息验证
     * @param loginServiceParam
     * @return
     */
    Integer login(LoginServiceParam loginServiceParam);

    /**
     * 查询员工个人信息
     * @param brokerId
     * @return
     */
    BrokerInfoDto getBrokerInfo(Integer brokerId);

    void orderHouse(Integer houseId, String houseType, Integer brokerId);

    /**
     * 关联员工与门店
     * @param shopId
     * @param brokerId
     */
    boolean correlation(Integer shopId, Integer brokerId);

    /**
     * 升职，获取员工信息，修改员工职位
     * @param brokerId
     * @return
     */
    PromotionDto promotion(Integer brokerId,Integer shopId);

    /**
     * 查询门店员工
     * @param shopId
     * @return
     */
    List<ShopBrokerInfoDto> getBrokerByShopId(Integer shopId);
}
